The clear( ) Function is used to remove all the elements of the List.
x = ["Mohan", "Kriti", "Salim"] x.clear() print(x)
So, in the above code we have created a 'List' and initialised to the variable 'x'.
Below is how the values are positioned in the List,
Next, we have used the 'clear( )' function that removes all the elements from the List making the List empty.
And we get an empty List as output,